3.5 \(\int \frac{\cos (a+b x)}{c+d x} \, dx\)

Optimal. Leaf size=52 \[ \frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{b c}{d}+b x\right )}{d}-\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{b c}{d}+b x\right )}{d} \]

[Out]

(Cos[a - (b*c)/d]*CosIntegral[(b*c)/d + b*x])/d - (Sin[a - (b*c)/d]*SinIntegral[(b*c)/d + b*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0983092, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3303, 3299, 3302} \[ \frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{b c}{d}+b x\right )}{d}-\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{b c}{d}+b x\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x]/(c + d*x),x]

[Out]

(Cos[a - (b*c)/d]*CosIntegral[(b*c)/d + b*x])/d - (Sin[a - (b*c)/d]*SinIntegral[(b*c)/d + b*x])/d

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\cos (a+b x)}{c+d x} \, dx &=\cos \left (a-\frac{b c}{d}\right ) \int \frac{\cos \left (\frac{b c}{d}+b x\right )}{c+d x} \, dx-\sin \left (a-\frac{b c}{d}\right ) \int \frac{\sin \left (\frac{b c}{d}+b x\right )}{c+d x} \, dx\\ &=\frac{\cos \left (a-\frac{b c}{d}\right ) \text{Ci}\left (\frac{b c}{d}+b x\right )}{d}-\frac{\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{b c}{d}+b x\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.0992167, size = 50, normalized size = 0.96 \[ \frac{\cos \left (a-\frac{b c}{d}\right ) \text{CosIntegral}\left (\frac{b c}{d}+b x\right )-\sin \left (a-\frac{b c}{d}\right ) \text{Si}\left (\frac{b c}{d}+b x\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x]/(c + d*x),x]

[Out]

(Cos[a - (b*c)/d]*CosIntegral[(b*c)/d + b*x] - Sin[a - (b*c)/d]*SinIntegral[(b*c)/d + b*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 72, normalized size = 1.4 \begin{align*}{\frac{1}{d}{\it Si} \left ( bx+a+{\frac{-da+cb}{d}} \right ) \sin \left ({\frac{-da+cb}{d}} \right ) }+{\frac{1}{d}{\it Ci} \left ( bx+a+{\frac{-da+cb}{d}} \right ) \cos \left ({\frac{-da+cb}{d}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)/(d*x+c),x)

[Out]

Si(b*x+a+(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/d+Ci(b*x+a+(-a*d+b*c)/d)*cos((-a*d+b*c)/d)/d

________________________________________________________________________________________

Maxima [C]  time = 1.21845, size = 192, normalized size = 3.69 \begin{align*} -\frac{b{\left (E_{1}\left (\frac{i \, b c + i \,{\left (b x + a\right )} d - i \, a d}{d}\right ) + E_{1}\left (-\frac{i \, b c + i \,{\left (b x + a\right )} d - i \, a d}{d}\right )\right )} \cos \left (-\frac{b c - a d}{d}\right ) - b{\left (i \, E_{1}\left (\frac{i \, b c + i \,{\left (b x + a\right )} d - i \, a d}{d}\right ) - i \, E_{1}\left (-\frac{i \, b c + i \,{\left (b x + a\right )} d - i \, a d}{d}\right )\right )} \sin \left (-\frac{b c - a d}{d}\right )}{2 \, b d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/(d*x+c),x, algorithm="maxima")

[Out]

-1/2*(b*(exp_integral_e(1, (I*b*c + I*(b*x + a)*d - I*a*d)/d) + exp_integral_e(1, -(I*b*c + I*(b*x + a)*d - I*
a*d)/d))*cos(-(b*c - a*d)/d) - b*(I*exp_integral_e(1, (I*b*c + I*(b*x + a)*d - I*a*d)/d) - I*exp_integral_e(1,
 -(I*b*c + I*(b*x + a)*d - I*a*d)/d))*sin(-(b*c - a*d)/d))/(b*d)

________________________________________________________________________________________

Fricas [A]  time = 1.06019, size = 200, normalized size = 3.85 \begin{align*} \frac{{\left (\operatorname{Ci}\left (\frac{b d x + b c}{d}\right ) + \operatorname{Ci}\left (-\frac{b d x + b c}{d}\right )\right )} \cos \left (-\frac{b c - a d}{d}\right ) - 2 \, \sin \left (-\frac{b c - a d}{d}\right ) \operatorname{Si}\left (\frac{b d x + b c}{d}\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/(d*x+c),x, algorithm="fricas")

[Out]

1/2*((cos_integral((b*d*x + b*c)/d) + cos_integral(-(b*d*x + b*c)/d))*cos(-(b*c - a*d)/d) - 2*sin(-(b*c - a*d)
/d)*sin_integral((b*d*x + b*c)/d))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos{\left (a + b x \right )}}{c + d x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/(d*x+c),x)

[Out]

Integral(cos(a + b*x)/(c + d*x), x)

________________________________________________________________________________________

Giac [C]  time = 1.18177, size = 779, normalized size = 14.98 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)/(d*x+c),x, algorithm="giac")

[Out]

1/2*(real_part(cos_integral(b*x + b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d)^2 + real_part(cos_integral(-b*x - b*c/d)
)*tan(1/2*a)^2*tan(1/2*b*c/d)^2 - 2*imag_part(cos_integral(b*x + b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d) + 2*imag_
part(cos_integral(-b*x - b*c/d))*tan(1/2*a)^2*tan(1/2*b*c/d) - 4*sin_integral((b*d*x + b*c)/d)*tan(1/2*a)^2*ta
n(1/2*b*c/d) + 2*imag_part(cos_integral(b*x + b*c/d))*tan(1/2*a)*tan(1/2*b*c/d)^2 - 2*imag_part(cos_integral(-
b*x - b*c/d))*tan(1/2*a)*tan(1/2*b*c/d)^2 + 4*sin_integral((b*d*x + b*c)/d)*tan(1/2*a)*tan(1/2*b*c/d)^2 - real
_part(cos_integral(b*x + b*c/d))*tan(1/2*a)^2 - real_part(cos_integral(-b*x - b*c/d))*tan(1/2*a)^2 + 4*real_pa
rt(cos_integral(b*x + b*c/d))*tan(1/2*a)*tan(1/2*b*c/d) + 4*real_part(cos_integral(-b*x - b*c/d))*tan(1/2*a)*t
an(1/2*b*c/d) - real_part(cos_integral(b*x + b*c/d))*tan(1/2*b*c/d)^2 - real_part(cos_integral(-b*x - b*c/d))*
tan(1/2*b*c/d)^2 - 2*imag_part(cos_integral(b*x + b*c/d))*tan(1/2*a) + 2*imag_part(cos_integral(-b*x - b*c/d))
*tan(1/2*a) - 4*sin_integral((b*d*x + b*c)/d)*tan(1/2*a) + 2*imag_part(cos_integral(b*x + b*c/d))*tan(1/2*b*c/
d) - 2*imag_part(cos_integral(-b*x - b*c/d))*tan(1/2*b*c/d) + 4*sin_integral((b*d*x + b*c)/d)*tan(1/2*b*c/d) +
 real_part(cos_integral(b*x + b*c/d)) + real_part(cos_integral(-b*x - b*c/d)))/(d*tan(1/2*a)^2*tan(1/2*b*c/d)^
2 + d*tan(1/2*a)^2 + d*tan(1/2*b*c/d)^2 + d)